<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex qrganizationalBureau_flex_0"
        :style="{height:(90+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub qrganizationalBureau_fd0_0'>
          <image @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/shouye/search/search`"
            class='qrganizationalBureau_fd0_0_c1' mode="aspectFit" :src='STATIC_URL+"23.png"'></image>

          <text class='qrganizationalBureau_fd0_0_c0'>组局</text>
          <image @tap.stop="isedit=!isedit" data-type="navigateTo" :data-url="`/pages/tabBar/releasePage/releasePage`"
            class='qrganizationalBureau_fd0_0_c1' mode="aspectFit" src='/static/tab/tab_diy2.png'></image>
        </view>

      </view>
      <view class="mask-fiii" v-if="isedit" :style="{top: (90+StatusBarRpx)+'rpx'}">
        <view class='flex flex-direction align-stretch benben-flex-position-popup flex favoritePosts_popup_1'>
          <text class='favoritePosts_positionPopup1_c0' @tap.stop="gopublishFunc(1)">发个帖</text>
          <text class='favoritePosts_positionPopup1_c0' @tap.stop="gopublishFunc(2)">提个问</text>
          <text class='favoritePosts_positionPopup1_c0s' @tap.stop="gopublishFunc(3)">组个局</text>
          <!-- <text class='favoritePosts_positionPopup1_c2' @tap.stop="delFunc()">删除收藏夹</text> -->
        </view>
      </view>
      <view :style="{height: (90+StatusBarRpx)+'rpx'}"></view>
      <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex homePage_flex_1"
        :style="{top:(90+StatusBarRpx)+'rpx', }">
        <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
          <benben-down-menu ref="downMenu1704166702442" v-model="is_drup" :auto='false' :z-index='99'
            mark-color='rgba(0,0,0,0.3)'>
            <view class="position-relative">
              <benben-flex-tabs class-name='homePage_benbenTabsfd1_0_c0_c1' v-model="cate_id"
                ref="benben_tabsfd1_0_c0_c1" select-mark="benben_tabsfd1_0_c0_c1" key="benben_tabsfd1_0_c0_c1"
                :open-title-type='false' :open-sticky='false' :top='0' :is-show-content='false' :scrollspy='false'
                :tabs-info.sync="tabsInfofd1_0_c0_c1">

                <scroll-view @scroll="tabsInfofd1_0_c0_c1.scrollX = $event.detail.scrollLeft"
                  id="benben_tabsfd1_0_c0_c1" class="benben-tabs" style="width:686rpx" :scroll-x="true"
                  :scroll-left.sync="tabsInfofd1_0_c0_c1.moveX" scroll-with-animation="all .3s ease">
                  <view class="benben-tabs-content" id="benben_tabsfd1_0_c0_c1-content">
                    <view id="benben_tabsfd1_0_c0_c1-title" class="benben-tabs-title flex align-center flex ">
                      <template v-for='(item,key0) in cateType' v-if="key0<5">
                        <view :key='key0'
                          :class="{ 'checkTitlefd1_0_c0_c1': cate_id == item.aid, 'flex flex-wrap align-center justify-center homePage_titlefd1_0_c0_c1_c3': true }"
                          @tap="getSearch(item)" :id="`benben_tabsfd1_0_c0_c1-title-item-${item.aid}`">

                          <text>{{item.cate_name}}</text>

                        </view>
                      </template>
                    </view>
                    <view :style="{ left: tabsInfofd1_0_c0_c1.lineleft, maxWidth: tabsInfofd1_0_c0_c1.lineWidth ,}"
                      id="benben_tabsfd1_0_c0_c1-line"
                      class="benben-tabs-line flex benben-flex-tabs-line homePage_linefd1_0_c0_c1"></view>
                  </view>
                </scroll-view>

                <view class='flex flex-wrap align-center homePage_rightfd1_0_c0_c1_c0' @tap.stop="opeContainerFunc()">
                  <image class='homePage_rightfd1_0_c0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"60.png"'></image>
                </view>

              </benben-flex-tabs>

            </view>

            <template #popup>
              <view class='flex flex-direction flex-wrap align-stretch homePage_fd1_0_c0_c0'>
                <view class='flex flex-direction flex-wrap align-stretch flex-sub homePage_fd1_0_c0_c0_c0'>
                  <view class='flex flex-wrap align-center homePage_fd1_0_c0_c0_c0_c0'>
                    <text class='homePage_fd1_0_c0_c0_c0_c0_c0'>分类</text>
                  </view>
                  <view class='flex flex-wrap align-center homePage_fd1_0_c0_c0_c0_c1'>
                    <benben-select-diy ref="showSelectPopup1704166614107" class-name='flex flex-wrap align-center flex'
                      :items.sync="cateType" v-model="cate_id" default-type="aid" default-label="cate_name"
                      :allow-cancel='false' type="radio" :disabled='false'>
                      <template v-for='(item,key0) in cateType'>
                        <view v-if="item.isSelected"
                          class='flex align-center justify-center flex homePage_fd1_0_c0_c0_c0_c1_c0_c0' :key="key0"
                          @tap="$refs.showSelectPopup1704166614107.tapHandle(key0)">
                          <text class='homePage_fd1_0_c0_c0_c0_c1_c0_c0_c0'>{{item.cate_name}}</text>
                        </view>
                        <view v-else class='flex align-center justify-center flex homePage_fd1_0_c0_c0_c0_c1_c0_c1'
                          :key="key0" @tap="$refs.showSelectPopup1704166614107.tapHandle(key0)">
                          <text class='homePage_fd1_0_c0_c0_c0_c1_c0_c1_c0'>{{item.cate_name}}</text>
                        </view>
                      </template></benben-select-diy>
                  </view>
                  <view class='flex flex-wrap align-center justify-between homePage_fd1_0_c0_c0_c0_c2'>
                    <button class='homePage_fd1_0_c0_c0_c0_c2_c0' @tap.stop="resetFunc()">重置</button>
                    <button class='homePage_fd1_0_c0_c0_c0_c2_c1' @tap.stop="confirmFunc()">确定</button>
                  </view>
                </view>
              </view>

            </template>
          </benben-down-menu>
        </view>

      </view>
      <view :style="{height: '88rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout qrganizationalBureau_flex_1">
        <template v-for='(item,key0) in dataList'>
          <view class='flex flex-direction flex-wrap align-stretch qrganizationalBureau_fd1_0' @tap.stop="handleJumpDiy"
            data-type="navigateTo"
            :data-url="`/pages/zuju/organizationalDetails/organizationalDetails?aid=${item.aid}&latitude=${address.latitude}&longitude=${address.longitude}`"
            :key='key0'>
            <view class='flex flex-wrap align-center'>
              <image class='qrganizationalBureau_fd1_0_c0_c0' mode="aspectFit" :src='item.avatar'></image>
              <view class='flex flex-direction flex-wrap align-start'>
                <view class='flex flex-wrap align-center qrganizationalBureau_fd1_0_c1'>
                  <text class='qrganizationalBureau_fd1_0_c1_c0'>{{item.user_nickname}}</text>
                </view>
                <view class='text-cut qrganizationalBureau_fd1_0_c0_c1_c0'>{{item.title}}</view>
                <!-- <view class='flex flex-wrap align-center'>
                  <text class='qrganizationalBureau_fd1_0_c0_c1_c1_c0'>{{item.postofficecate_cate_name}}</text>
                </view> -->
              </view>
            </view>
            <!-- <view class='flex flex-wrap align-center organizationalDetails_fd1_0_c0_c0_c1_c1'>
              <text class='organizationalDetails_fd1_0_c0_c0_c1_c1_c0'>{{item.create_time}}</text>
              <view class='text-cut organizationalDetails_fd1_0_c0_c0_c1_c1_c1' style="width:350rpx;">
                来自{{item.user_school}}
              </view>
            </view> -->
            <view class='flex  align-center margin-tb-sm'>
              <view class='flex flex-wrap align-center'>
                <text class='qrganizationalBureau_fd1_0_c0_c1_c1_c0'>{{item.postofficecate_cate_name}}</text>
              </view>
              <view class=' text-df text-333 text-cut' style="width: 520rpx;">{{item.content}}</view>
            </view>
            <!-- <view class='flex flex-wrap align-center qrganizationalBureau_fd1_0_c1'>
              <text class='qrganizationalBureau_fd1_0_c1_c0'>{{item.user_nickname}}</text>
            </view> -->
            <view class='flex flex-wrap align-center qrganizationalBureau_fd1_0_c2'>
              <view class='flex flex-wrap align-center'>
                <image class='qrganizationalBureau_fd1_0_c2_c0_c0' mode="aspectFit" :src='STATIC_URL+"27.png"'></image>
                <text class='qrganizationalBureau_fd1_0_c2_c0_c1'>{{item.office_time}}</text>
              </view>
            </view>
            <view class='flex flex-wrap align-center justify-between qrganizationalBureau_fd1_0_c2'>
              <view class='flex flex-wrap align-center'>
                <image class='qrganizationalBureau_fd1_0_c2_c0_c0' mode="aspectFit" :src='STATIC_URL+"29.png"'></image>
                <text class='qrganizationalBureau_fd1_0_c2_c0_c1' style="width: 400rpx;">{{item.address || '待定'}}</text>
              </view>
              <text class=' qrganizationalBureau_fd1_0_c3_c1_c0' style="width: 150rpx;text-align: right;"
                v-if="item.distance">{{item.distance || ''}}</text>
              <!-- v-if="item.distance" -->
              <!-- <view class='flex flex-wrap align-end' style="width: 150rpx;text-align: center;">
                <text class='qrganizationalBureau_fd1_0_c3_c1_c0'>{{item.distance || 'pppppp'}}</text>
              </view> -->
            </view>

            <view class='flex flex-wrap align-center justify-between qrganizationalBureau_fd1_0_c2'>
              <view class='flex flex-wrap align-center'>
                <image class='qrganizationalBureau_fd1_0_c2_c0_c0' mode="aspectFit" :src='STATIC_URL+"30.png"'></image>
                <text class='qrganizationalBureau_fd1_0_c2_c0_c1'>{{item.people_num}}</text>
                <text class='qrganizationalBureau_fd1_0_c2_c0_c1'>人局</text>
                <text class='qrganizationalBureau_fd1_0_c4_c0_c3'>|</text>
                <text class='qrganizationalBureau_fd1_0_c2_c0_c1'>差</text>
                <text class='qrganizationalBureau_fd1_0_c2_c0_c1'>{{item.need_people}}</text>
                <text class='qrganizationalBureau_fd1_0_c2_c0_c1'>人</text>
                <!-- /pages/wode/participationRecord/participationRecord?aid=60 -->
                <text class='qrganizationalBureau_fd1_0_c2_c0_c1 margin-left-sm' style="color: #6450eb;"
                  @tap.stop="handleJumpDiy" data-type="navigateTo"
                  :data-url="`/pages/wode/participationRecord/participationRecord?aid=${item.aid}`"
                  v-if=" item.is_apply==0">瞧瞧都有谁？</text>
              </view>
              <text class=' qrganizationalBureau_fd1_0_c3_c1_c0'
                style="width: 150rpx;text-align: right;">{{item.know}}</text>
              <!-- <view class='flex flex-wrap align-end' style="width: 150rpx">
                <text class=' qrganizationalBureau_fd1_0_c3_c1_c0'>{{item.know}}</text>
              </view> -->
            </view>
            <view class='flex flex-wrap align-center qrganizationalBureau_fd1_0_c2'>
              <view class='flex flex-wrap align-center'>
                <image class='qrganizationalBureau_fd1_0_c2_c0_c0' mode="aspectFit" :src='STATIC_URL+"28.png"'></image>
                <text class='qrganizationalBureau_fd1_0_c2_c0_c1'>人均费用：</text>
                <!-- <text class='qrganizationalBureau_fd1_0_c2_c0_c1' v-if="item.money">$</text> -->
                <text class='qrganizationalBureau_fd1_0_c2_c0_c1'>{{item.money}}</text>
              </view>
            </view>
            <!-- qrganizationalBureau_fd1_0_c6_1 -->
            <button class='qrganizationalBureau_fd1_0_c6_1' @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pages/wode/participationRecord/participationRecord?aid=${item.aid}`"
              v-if="isLogin &&( item.user_id==userInfo.id) ">参与列表</button>
            <view class="" v-else>
              <button class='qrganizationalBureau_fd1_0_c6' @tap.stop="comegroupFunc(item.aid)"
                v-if=" item.is_apply==0">报名参加</button>
              <!-- @tap.stop="calcel(item)" -->
              <button class='qrganizationalBureau_fd1_0_c6_1' @tap.stop="handleJumpDiy" data-type="navigateTo"
                :data-url="`/pages/wode/participationRecord/participationRecord?aid=${item.aid}`"
                v-if=" item.is_apply=='1'">参与列表（审核中）</button>
              <button class='qrganizationalBureau_fd1_0_c6_1' @tap.stop="handleJumpDiy" data-type="navigateTo"
                :data-url="`/pages/wode/participationRecord/participationRecord?aid=${item.aid}`"
                v-if=" item.is_apply=='2'">参与列表</button>
              <button class='organizationalDetails_fd1_0_c4_c0s' v-if="item.is_apply==4">已取消</button>
            </view>

            <view class='flex flex-wrap align-center justify-between qrganizationalBureau_fd1_0_c7'>
              <view class='flex flex-wrap align-center' @tap.stop="cancelCollectionFunc(item)">
                <image class='qrganizationalBureau_fd1_0_c7_c0_c0' mode="aspectFit" :src='STATIC_URL+"24.png"'
                  v-if=" item.is_collection==0"></image>
                <image class='qrganizationalBureau_fd1_0_c7_c0_c0' mode="aspectFit" :src='STATIC_URL+"83.png"'
                  v-if=" item.is_collection=='1'"></image>
                <text class='qrganizationalBureau_fd1_0_c3_c1_c0'>{{item.collection_number}}</text>
              </view>
              <view class='flex flex-wrap align-center'>
                <image class='qrganizationalBureau_fd1_0_c7_c0_c0' mode="aspectFit" :src='STATIC_URL+"26.png"'></image>
                <text class='qrganizationalBureau_fd1_0_c3_c1_c0'>{{item.comment_number}}</text>
              </view>
              <view class='flex flex-wrap align-center'>
                <image class='qrganizationalBureau_fd1_0_c7_c0_c0' mode="aspectFit" :src='STATIC_URL+"25.png"'></image>
                <text class='qrganizationalBureau_fd1_0_c3_c1_c0'>{{item.share_num}}</text>
              </view>
            </view>
          </view>
        </template>
        <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
          :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
      </view>

      <!---flex布局flex布局结束-->
      <benben-popup v-model="popupShow1704966034760" :mask="true" :mask-close-able="false" mode='center' :z-index='999'>
        <!---参加成功flex布局开始-->
        <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout qrganizationalBureau_flex_2">
          <view class='flex flex-direction flex-wrap align-stretch'>
            <view class='flex flex-wrap align-center justify-center'>
              <image class='qrganizationalBureau_fd2_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"5.png"'></image>
            </view>
            <view class='flex flex-direction flex-wrap align-center'>
              <text class='qrganizationalBureau_fd2_0_c1_c0'>报名成功</text>
              <text class='qrganizationalBureau_fd2_0_c1_c1'>发布者会在1个工作日内反馈，请耐心等待</text>
            </view>
            <view class='flex flex-wrap align-center justify-center qrganizationalBureau_fd2_0_c2'
              @tap.stop="lKnowFunc()">
              <text class='qrganizationalBureau_fd2_0_c2_c0'>我知道了</text>
            </view>
          </view>
        </view>

        <!---参加成功flex布局结束-->

      </benben-popup>
      <benben-popup v-model="popupShow1704966493349" :mask="true" :mask-close-able="true" mode='center' :z-index='999'>
        <!---取消参加flex布局开始-->
        <view class="flex benben-flex-layout flex-wrap align-center">
          <view class='flex flex-direction flex-wrap align-center qrganizationalBureau_fd3_0'>
            <text class='qrganizationalBureau_fd3_0_c0'>提示</text>
            <text class='qrganizationalBureau_fd3_0_c1'>确定取消参加吗？</text>
            <view class='flex align-center qrganizationalBureau_fd3_0_c2'>
              <button class='qrganizationalBureau_fd3_0_c2_c0' @tap.stop="popupShow1704966493349=false">取消</button>
              <button class='qrganizationalBureau_fd3_0_c2_c1' @tap.stop="cancelParticipationFunc()">确认</button>
            </view>
          </view>
        </view>

        <!---取消参加flex布局结束-->

      </benben-popup>
      <benben-popup v-model="popupShow1705070444859" :mask="true" :mask-close-able="false" mode='center' :z-index='999'>
        <!---没有验证flex布局开始-->
        <view class="flex benben-flex-layout flex-wrap align-center">
          <view class='flex flex-direction flex-wrap align-center releasePage_fd1_0'>
            <text class='releasePage_fd1_0_c0'>提示</text>
            <text class='releasePage_fd1_0_c1'>您的学校还没有验证通过，暂不
              能发布，是否去进项学校验证？</text>
            <view class='flex align-center releasePage_fd1_0_c2'>
              <button class='releasePage_fd1_0_c2_c0' @tap.stop="popupShow1705070444859=false">取消</button>
              <button class='releasePage_fd1_0_c2_c1' @tap.stop="handleJumpDiy" data-type="navigateTo"
                :data-url="`/pages/dlzc/addSchool/addSchool`">去验证</button>
            </view>
          </view>
        </view>

        <!---没有验证flex布局结束-->

      </benben-popup>

    </view>
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  import {
    validate
  } from '@/common/utils/validate.js';
  import {
    TUILogin
  } from "@tencentcloud/tui-core";

  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "tabsInfofd1_0": {
          lineleft: '',
          lineWidth: '',
          moveX: 0,
          scrollX: 0,
          PageScrollX: 0
        },
        "tabsInfofd1_0_c0_c1": {
          lineleft: '',
          lineWidth: '',
          moveX: 0,
          scrollX: 0,
          PageScrollX: 0
        },
        "tabls": "0",
        "popupShow1704966493349": false,
        "popupShow1704966034760": false,
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "state": "1",
        "dataList": [],
        "postoffice_id": "",
        "action": "",
        address: {
          latitude: '',
          longitude: '',
          city: ''
        },
        chatnums: 0,
        info: {
          comment_choose: 0,
          follow: 0,
          suppert_collection: 0,
          news_system_time: '',
          news_system: ''
        },
        cateType: [],
        cate_id: '',
        isedit: false,
        data: '',
        popupShow1705070444859: false,
        is_drup: false
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },
      isLogin() {
        return this.$store.state.token == '' ? false : true;
      },
      userInfo: {
        get() {
          return this.$store.state.userInfo.userinfo
        },
        set() {
          this.$store.commit('updateUserInfo', value)
        },
      },
    },
    watch: {},
    async onLoad(options) {
      await this.getType()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      let that = this

      if (that.isLogin) {
        that.getUserFunc()
        that.getMessFunc()
      }
      if (uni.getStorageSync('gugeaddress')) {
        this.address.latitude = uni.getStorageSync("gugeaddress").latitude
        this.address.longitude = uni.getStorageSync("gugeaddress").longitude
        this.address.city = uni.getStorageSync("gugeaddress").addresstxt
      } else {
        uni.getLocation({
          type: 'wgs84',
          // #ifdef APP
          geocode: true,
          // #endif
          isHighAccuracy: true,
          success: adr => {
            console.log('adradradradr', adr)
            const obj = {
              latitude: adr.latitude,
              longitude: adr.longitude,
              addresstxt: ''
            }
            uni.setStorageSync('gugeaddress', obj)
            that.address = uni.getStorageSync('gugeaddress')
            that.getBureaulistFunc()
          },
          fail: fail => {
            // that.$message.info(JSON.stringify(complete))
            console.log('complete', complete)
          },
          complete: complete => {
            // that.$message.info(JSON.stringify(complete))
            console.log('complete', complete)
          }
        })
      }

    },
    onHide() {
      this.isedit = false
      this.popupShow1705070444859 = false
    },
    onResize() {

    },
    onPullDownRefresh() {
      this.getBureaulistFunc()
    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //开启下拉容器
      opeContainerFunc() {
        if (this.is_drup === false) {
          this.is_drup = true;
        } else {
          this.is_drup = false;
        }
        this.getBureaulistFunc()
      },
      getSearch(item) {
        let that = this
        that.cate_id = item.aid
        that.getBureaulistFunc()
      },
      confirmFunc() {
        this.is_drup = false;
        this.getBureaulistFunc()
      },
      resetFunc() {
        this.cate_id = this.cateType[0].aid
        this.is_drup = false;
        this.getBureaulistFunc()
      },
      async getUserFunc() {
        //请求方法
        //数据验证

        let datadata = await this.$api.get(global.apiUrls.post5c78c4772da97, {

        });

        if (datadata.data.code != 1) {
          this.$message.info(datadata.data.msg);
          return
        }
        let infodata = datadata.data;
        this.data = infodata.data
      },
      gopublishFunc(type) {
        if (this.data.is_school == 0 || this.data.is_school == 1) {
          this.popupShow1705070444859 = true;
        } else {
          if (type == '1') {
            this.$urouter.navigateTo(`/pages/fabu/postApost/postApost?aid=0&type=1`);
          } else if (type == '2') {
            this.$urouter.navigateTo(`/pages/fabu/postApost/postApost?aid=0&type=2`);
          } else if (type == '3') {
            this.$urouter.navigateTo(`/pages/fabu/groupBureau/groupBureau?aid=0`);
          }
        }
      },
      chooseType(item) {
        this.cate_id = item.aid
        this.getBureaulistFunc()
      },
      getType() {
        this.$api.post(global.apiUrls.post66626ce15105b).then(res => {
          if (res.data.code == 1) {
            this.cateType = res.data.data
            this.cate_id = this.cateType[0].aid
            this.getBureaulistFunc()
            console.log('cate_id', this.cate_id)
          }
        })
      },
      async getMessFunc() {
        //请求方法
        //数据验证

        let datadataMeas = await this.$api.get(global.apiUrls.post657a9b8d16d9b, {

        });

        if (datadataMeas.data.code != 1) {
          this.$message.info(datadataMeas.data.msg);
          return
        }
        let infodataMeas = datadataMeas.data;
        this.info = infodataMeas.data
        if (uni.$TIM.isReady()) {
          this.chatnums = TUILogin.chat.getTotalUnreadMessageCount();
          // this.$store.commit('getNum', nums);

        }
        let totaoNum = parseFloat(this.chatnums) + parseFloat(this.info.total)
        if (totaoNum) {
          uni.setTabBarBadge({
            index: 2,
            text: totaoNum.toString()
          })
        }
        console.log('dataMeas', this.info)

      },
      shareApp(item) {
        let that = this
        uni.share({
          provider: 'weixin',
          scene: 'WXSceneSession',
          imageUrl: '/static/1.png',
          title: item.title,
          href: item.share_url,
          success: function(res) {
            console.log('22222')
            that.$api.post(global.apiUrls.post66274e855d168, {
              office_id: item.aid
            }).then(resss => {

              console.log('ppppppppppppppppp', resss.data)
            })
            item.share_num = item.share_num + 1
            console.log("success:" + JSON.stringify(res));
          },
          fail: function(err) {
            this.$message.info('分享失败')
            console.log("fail:" + JSON.stringify(err));
          }
        });
      },
      //获取组局列表
      getBureaulistFunc() {
        console.log('gre', this.address.longitude, this.address.latitude)
        this.minixPagingListsApi = global.apiUrls.post657954dc6ed07;
        this.pageingListApiMethod = 'get';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          lng: this.address.longitude || '',
          lat: this.address.latitude || '',
          cate_id: this.cate_id
        }
        uni.stopPullDownRefresh()
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();

      },
      //参加组局
      async comegroupFunc(id) {
        this.postoffice_id = id;
        //请求方法
        //数据验证

        let data6579855b6a404 = await this.$api.post(global.apiUrls.post6579855b6a404, {
          postoffice_id: this.postoffice_id
        });

        if (data6579855b6a404.data.code != 1) {
          this.$message.info(data6579855b6a404.data.msg);
          return
        }



        this.popupShow1704966034760 = true;
      },
      calcel(item) {
        this.postoffice_id = item.aid
        this.popupShow1704966493349 = true
      },
      //取消参局
      async cancelParticipationFunc() {
        //请求方法
        //数据验证

        let data657a60c34225e = await this.$api.post(global.apiUrls.post657a60c34225e, {
          postoffice_id: this.postoffice_id
        });
        this.popupShow1704966493349 = false
        if (data657a60c34225e.data.code != 1) {
          this.$message.info(data657a60c34225e.data.msg);
          return
        }



        this.getBureaulistFunc()
      },
      //我知道了
      lKnowFunc() {
        this.popupShow1704966034760 = false;
        this.getBureaulistFunc()
      },
      //取消参加
      // cancelParticipationFunc(id) {
      //   this.popupShow1704966493349 = true;
      // },
      //取消确定收藏
      async cancelCollectionFunc(item) {
        //请求方法
        //数据验证
        console.log('cancelCollectionFunc', item)
        let data6578266d977f5 = await this.$api.post(global.apiUrls.post6578266d977f5, {
          type: '3',
          postoffice_id: item.aid,
          action: item.is_collection == 0 ? 1 : 0
        });

        if (data6578266d977f5.data.code != 1) {
          this.$message.info(data6578266d977f5.data.msg);
          return
        }

        item.is_collection == 0 ? item.is_collection = 1 : item.is_collection = 0
        if (item.is_collection == 0) {
          item.collection_number = item.collection_number - 1
        } else {
          item.collection_number = item.collection_number + 1
        }
      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .organizationalDetails_fd1_0_c0_c0_c1_c1_c1 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
    margin: 0rpx 0rpx 0rpx 0;
  }

  .organizationalDetails_fd1_0_c0_c0_c1_c1_c0 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
    // margin-left: 24rpx;
  }

  .organizationalDetails_fd1_0_c0_c0_c1_c1 {
    margin: 6rpx 0rpx 0rpx 0rpx;
  }

  .checkTitlefd1_0_c0_c1 {
    font-weight: 700 !important;
    font-size: 28rpx !important;
    color: #6450EB !important;
  }

  .homePage_fd1_0_c0_c0_c0_c2_c1 {
    background: rgba(100, 80, 235, 1);
    border-radius: 64rpx;
    width: 414rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: var(--benbenFontColor3);
  }

  .homePage_fd1_0_c0_c0_c0_c2_c0 {
    background: rgba(248, 248, 248, 1);
    border-radius: 64rpx;
    width: 240rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: rgba(102, 102, 102, 1);
  }

  .homePage_fd1_0_c0_c0_c0_c2 {
    margin: 28rpx 15rpx 0rpx 0rpx;
  }

  .homePage_fd1_0_c0_c0_c0_c1_c0_c1_c0 {
    color: #333333;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 24rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .homePage_fd1_0_c0_c0_c0_c1_c0_c1 {
    background: rgba(248, 248, 248, 1);
    margin: 0rpx 15rpx 20rpx 0rpx;
    width: 160rpx;
    height: 64rpx;
    border-radius: 8rpx;
    background-size: 100% auto;
  }

  .homePage_fd1_0_c0_c0_c0_c1_c0_c0_c0 {
    color: #6450EB;
    font-size: 24rpx;
    font-weight: 700;
    line-height: 24rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .homePage_fd1_0_c0_c0_c0_c1_c0_c0 {
    border: 1px solid rgba(100, 80, 235, 1);
    background: rgba(100, 80, 235, 0.08);
    margin: 0rpx 15rpx 20rpx 0rpx;
    width: 160rpx;
    height: 64rpx;
    border-radius: 8rpx;
    background-size: 100% auto;
  }

  .homePage_fd1_0_c0_c0_c0_c1 {
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .homePage_fd1_0_c0_c0_c0_c0_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 700;
    line-height: 48rpx;
  }

  .homePage_fd1_0_c0_c0_c0_c0 {
    margin: 0rpx 15rpx 0rpx 0rpx;
  }

  .homePage_fd1_0_c0_c0_c0 {
    padding: 32rpx 17rpx 33rpx 32rpx;
  }

  .homePage_fd1_0_c0_c0 {
    background: #ffffff;
    width: 750rpx;
    border-radius: 0rpx 0rpx 24rpx 24rpx;
  }

  .homePage_flex_1 {
    background: rgba(255, 255, 255, 1);
    width: 750rpx;
    height: 90rpx;
    z-index: 10;
    top: 90rpx;
    background-size: 100% auto;
  }

  ::v-deep .homePage_benbenTabsfd1_0_c0_c1 {
    background: #fff;
    width: 750rpx;
    height: 90rpx;
    white-space: nowrap;
    text-align: center;
    font-size: 28rpx;
    font-weight: 400;
    color: #999999;
    // padding: 0 24rpx;
  }

  .homePage_linefd1_0_c0_c1 {
    background: rgba(255, 255, 255, 1);
    width: 100rpx;
    height: 8rpx;
    top: 80rpx;
    background-size: 100% auto !important;
  }

  .homePage_rightfd1_0_c0_c1_c0_c0 {
    width: 44rpx;
    height: 44rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .homePage_rightfd1_0_c0_c1_c0 {
    width: 44rpx;
    height: 44%;
    margin: 0rpx 32rpx 0rpx 0rpx;
  }

  .releasePage_fd1_0_c2_c1 {
    background: rgba(255, 255, 255, 1);
    font-size: 32rpx;
    color: rgba(100, 80, 235, 1);
    width: 270rpx;
    height: 101rpx;
    line-height: 101rpx;
    font-weight: 500;
  }

  .releasePage_fd1_0_c2_c0 {
    border-right: 1px solid #eee;
    background: #fff;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    width: 270rpx;
    height: 101rpx;
    line-height: 101rpx;
    font-weight: 400;
  }

  .releasePage_fd1_0_c2 {
    border-top: 1px solid #eee;
    margin: 51rpx 0rpx 0rpx 0rpx;
  }

  .releasePage_fd1_0_c1 {
    line-height: 44rpx;
    font-size: 28rpx;
    font-weight: 500;
    color: #333333;
    text-align: center;
    margin: 32rpx 40rpx 0rpx 40rpx;
  }

  .releasePage_fd1_0_c0 {
    line-height: 44rpx;
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    margin: 40rpx 0rpx 0rpx 0rpx;
  }

  .releasePage_fd1_0 {
    background: #fff;
    width: 540rpx;
    background-size: 100% auto !important;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .mask-fiii {
    width: auto;
    position: fixed;
    // top: 100rpx;
    right: 32rpx;
    z-index: 99;
  }

  .favoritePosts_popup_1 {
    background: rgba(51, 51, 51, 1);
    border-radius: 8rpx 8rpx 8rpx 8rpx;
    width: 245rpx;
    height: 264rpx;
    background-size: 100% auto !important;
  }

  .favoritePosts_positionPopup1_c0s {
    text-align: center;
    line-height: 38rpx;
    color: #FFFFFF;
    font-size: 28rpx;
    font-weight: 400;
    padding: 24rpx 0rpx 24rpx 0rpx;
  }

  .favoritePosts_positionPopup1_c0 {
    border-bottom: 1px solid rgba(112, 112, 112, 1);
    text-align: center;
    line-height: 38rpx;
    color: #FFFFFF;
    font-size: 28rpx;
    font-weight: 400;
    padding: 24rpx 0rpx 24rpx 0rpx;
  }

  .homePage_titlefd1_0_c0_c1_c3 {
    width: 130rpx;
  }

  .checkTitlefd1_0 {
    font-weight: 700 !important;
    font-size: 28rpx !important;
    color: #333 !important;
    background-color: rgba(255, 255, 255, 1) !important;
  }

  .participationRecords_linefd1_0 {
    background: rgba(100, 80, 235, 1);
    width: 48rpx;
    height: 6rpx;
    top: 80rpx;
    background-size: 100% auto !important;
    border-radius: 8rpx;
  }

  ::v-deep .participationRecords_benbenTabsfd1_0 {
    width: 750rpx;
    height: 98rpx;
    white-space: nowrap;
    text-align: center;
    font-size: 28rpx;
    font-weight: 400;
    color: #999999;
    background-color: #FFF;
  }

  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(248, 248, 248, 1);
    background-size: 100% auto;
  }

  .qrganizationalBureau_flex_0 {
    background: rgba(255, 255, 255, 1);
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto;
  }

  .qrganizationalBureau_fd0_0_c1 {
    width: 44rpx;
    height: 44rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd0_0_c0 {
    color: #333333;
    font-size: 40rpx;
    font-weight: 700;
    line-height: 45rpx;
  }

  .qrganizationalBureau_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .qrganizationalBureau_flex_1 {
    padding: 24rpx 32rpx 0rpx 32rpx;
  }

  .qrganizationalBureau_fd1_0_c7_c0_c0 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 12rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd1_0_c7 {
    border-top: 1px solid #eee;
    padding: 32rpx 0rpx 0rpx 0rpx;
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd1_0_c6_2 {
    background: rgba(248, 248, 248, 1);
    border-radius: 44rpx;
    width: 638rpx;
    line-height: 80rpx;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .organizationalDetails_fd1_0_c4_c0s {
    background: #f8f8f8;
    border-radius: 44rpx;
    width: 638rpx;
    line-height: 80rpx;
    font-size: 32rpx;
    color: #666;
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd1_0_c6_1 {
    border: 1px solid rgba(100, 80, 235, 1);
    background: rgba(255, 255, 255, 1);
    border-radius: 44rpx;
    width: 638rpx;
    line-height: 80rpx;
    font-size: 32rpx;
    color: rgba(100, 80, 235, 1);
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd1_0_c6 {
    background: rgba(100, 80, 235, 1);
    border-radius: 44rpx;
    width: 638rpx;
    line-height: 80rpx;
    font-size: 32rpx;
    color: #fff;
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd1_0_c4_c0_c3 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
    margin: 0rpx 20rpx 0rpx 20rpx;
  }

  .qrganizationalBureau_fd1_0_c3_c1_c0 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .qrganizationalBureau_fd1_0_c2_c0_c1 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .qrganizationalBureau_fd1_0_c2_c0_c0 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 10rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd1_0_c2 {
    margin: 0rpx 0rpx 14rpx 0rpx;
  }

  .qrganizationalBureau_fd1_0_c1_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
    // line-height: 42rpx;
  }

  .qrganizationalBureau_fd1_0_c1 {
    margin: 0 0rpx 8rpx 0rpx;
  }

  .qrganizationalBureau_fd1_0_c0_c1_c1_c0 {
    background: rgba(58, 134, 254, 0.1);
    color: #3A86FE;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
    padding: 2rpx 10rpx 2rpx 10rpx;
    border-radius: 4rpx;
    background-size: 100% auto;
    margin: 7rpx 14rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd1_0_c0_c1_c0 {
    color: #333333;
    font-size: 32rpx;
    width: 500rpx;
    font-weight: 700;
    line-height: 42rpx;
  }

  .qrganizationalBureau_fd1_0_c0_c0 {
    width: 88rpx;
    height: 88rpx;
    border-radius: 12rpx;
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd1_0 {
    background: rgba(255, 255, 255, 1);
    border-radius: 16rpx;
    background-size: 100% auto;
    margin: 0rpx 0rpx 24rpx 0rpx;
    padding: 32rpx 24rpx 32rpx 24rpx;
  }

  .qrganizationalBureau_flex_2 {
    background: rgba(255, 255, 255, 1);
    width: 540rpx;
    border-radius: 16rpx;
    background-size: 100% auto;
  }

  .qrganizationalBureau_fd2_0_c2_c0 {
    color: #6450EB;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 42rpx;
  }

  .qrganizationalBureau_fd2_0_c2 {
    border-top: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
    margin: 40rpx 0rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd2_0_c1_c1 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 52rpx;
  }

  .qrganizationalBureau_fd2_0_c1_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 52rpx;
  }

  .qrganizationalBureau_fd2_0_c0_c0 {
    width: 180rpx;
    height: 180rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd3_0_c2_c1 {
    background: rgba(255, 255, 255, 1);
    font-size: 32rpx;
    color: rgba(100, 80, 235, 1);
    width: 270rpx;
    height: 101rpx;
    line-height: 101rpx;
    font-weight: 500;
  }

  .qrganizationalBureau_fd3_0_c2_c0 {
    border-right: 1px solid #eee;
    background: #fff;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    width: 270rpx;
    height: 101rpx;
    line-height: 101rpx;
    font-weight: 400;
  }

  .qrganizationalBureau_fd3_0_c2 {
    border-top: 1px solid #eee;
    margin: 51rpx 0rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd3_0_c1 {
    line-height: 44rpx;
    font-size: 28rpx;
    font-weight: 500;
    color: #333333;
    text-align: center;
    margin: 32rpx 40rpx 0rpx 40rpx;
  }

  .qrganizationalBureau_fd3_0_c0 {
    line-height: 44rpx;
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    margin: 40rpx 0rpx 0rpx 0rpx;
  }

  .qrganizationalBureau_fd3_0 {
    background: #fff;
    width: 540rpx;
    background-size: 100% auto !important;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }
</style>
